﻿IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_module]') AND TYPE in (N'U'))
BEGIN
CREATE TABLE tb_module
(
    Id INT IDENTITY(1,1) NOT NULL,
	ModuleCode varchar(4) NOT NULL,
	ModuleName varchar(20) NOT NULL,
	ModuleDescription varchar(255) NOT NULL default(''),
	modulevalue varchar(20) not null default(''),
	LinkUrl varchar(255) NOT NULL default(''),
	ParentModule varchar(4),
	SortOrder int not null default(0),
    CreateBy VARCHAR(100),
    CreateDate DATETIME DEFAULT(GETDATE()),
    UpdateBy VARCHAR(100),
    UpdateDate DATETIME,
	CONSTRAINT PK_module_Id PRIMARY KEY CLUSTERED (Id)
) 
END
GO
